<%-- 
    Document   : editAppSpecialist
    Created on : 10 Nov, 2012, 6:35:54 PM
    Author     : sagar
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@include file="../common/script.jsp" %>
<script type="text/javaScript">
           
    //    function onSelect1()
    //    {
    //        
    //        var el = document.getElementById('hospitalId');
    //        var text = el.options[el.selectedIndex].text;
    //        document.getElementById("hospital1").value=text;
    //
    //       
    //    }
    //    function onDefault()
    //    {
    //        var el = document.getElementById('hospitalId');
    //        var text = el.options[el.selectedIndex].text;
    //        document.getElementById("hospital1").value=text;
    //
    //    }
    
    var rules=new Array();
    rules[0]='name|required|please enter specialist name';
    rules[1]='specialistTypeId|required|please select specialist type';
    //rules[2]='hospitalId|required|please select hospital';
    rules[2]='mobile|required|please enter mobile';
    //rules[4]='contact|required|please enter contact';
    //rules[5]='email|required|please enter email id';
    //rules[3]='timing1|required|please enter timing1';
    rules[3]='hospital1|required|please enter hospital 1 name';
    rules[4]='geographicalZone.geographicalZoneId|required|please select geographicalZone';
    rules[5]='remarks|maxlength|150|only 150 characters are allowed';
    //rules[7]='hospital2|required|please enter hospital2 name';
    //rules[8]='timing2|required|please enter timing2';
    //rules[9]='hospital3|required|please enter hospital3 name';
    //rules[10]='timing3|required|please enter timing3';
    //rules[11]='walkin|required|please enter walkin';   
</script>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp" %>
    </head>
    <body onLoad="yav.init('form1',rules,'inline');">
        <%@include file="../common/header.jsp" %>
        <%@include file="../common/menu.jsp" %>
        <div class="in_02" >
            <%@include file="../common/message.jsp" %>
            <form:form id="form1" modelAttribute="appSpecialist"  >
                <fieldset style="width:auto;">
                    <legend><spring:message code="title.editAppSpecialist"/></legend>
                    <fieldset>
                        <table class="formTable">   

                            <tr>

                                <td><spring:message code="appSpecialistName"/>:<br/><form:input path="name" id="name" class="userInputLarge"/>
                                    <br/><span id="errorsDiv_name"></span></td>
                                <td>Specialist type:<br/><form:select path="specialistTypeId.specialistTypeId" name="specialistTypeId" id="specialistTypeId" style="margin-bottom: 5px">
                                        <form:option value="" label="-"></form:option>
                                        <form:options items="${specialistTypeList}" itemLabel="specialistType" itemValue="specialistTypeId" ></form:options>
                                    </form:select>
                                    <br/><span id="errorsDiv_specialistTypeId"></span></td>
                                <td><spring:message code="appSpecialistMobile"/>:<br/><form:input path="mobile" id="mobile" class="userInputLarge"/>
                                    <br/><span id="errorsDiv_mobile"></td>
                                <td><spring:message code="email"/>:<br/><form:input path="email" id="email" class="userInputLarge"/>
                                    <br/><span id="errorsDiv_email"></td>


                            </tr>

                            <tr>
                                <td><spring:message code="appSpecialistHospital1"/>:<br/>
<!--                                    <input type="text" name="hospital1" id="hospital1" value="${hospital1}" readonly="true" class="userInputLarge">-->
                                    <form:textarea path="hospital1"  class="userInputLarge"/>
                                    <br/><span id="errorsDiv_hospital1"></td>
                                </td>
                                <td><spring:message code="appSpecialistPhone1"/>:<br/>
                                    <form:input path="contact1" id="contact" class="userInputLarge"/>
                                    <br/><span id="errorsDiv_contact">
                                </td>
                                <td><spring:message code="appSpecialistTiming1"/>:<br/><form:input path="timing1"  class="userInputLarge"/>
                                    <br/><span id="errorsDiv_timing1"></td>
                                <td><spring:message code="selectAppZone"/>:<br/>
                                    <form:select  path="geographicalZone.geographicalZoneId"  style="margin-bottom: 5px">
                                        <form:option value="" label="-"></form:option>
                                        <form:options items="${geoZoneList}" itemLabel="geographicalZoneName" itemValue="geographicalZoneId" cssClass="userInputMedium"></form:options>
                                    </form:select>
                                    <br/><span id="errorsDiv_geographicalZone.geographicalZoneId"></span>
                                </td>
                            </tr>
                            <tr>
                                <td><spring:message code="active"/>:<br/><spring:message code="yes"/> <form:radiobutton path="active" value="true"/>&nbsp;&nbsp;&nbsp;<spring:message code="no"/> <form:radiobutton path="active" value="false"/></td>
                            </tr>
                        </table>

                    </fieldset>
                    <fieldset>
                        <legend>Other Details</legend>
                        <table class="formTable">
                            <tr>
                                <td><spring:message code="appSpecialistHospital2"/>:<br/>
                                    <form:textarea path="hospital2" id="hospital2" class="userInputLarge"/>
                                </td>
                                <td><spring:message code="appSpecialistPhone2"/>:<br/>
                                    <form:input path="contact2" id="contact" class="userInputLarge"/>

                                </td>
                                <td><spring:message code="appSpecialistTiming2"/>:<br/>
                                    <form:input path="timing2" id="timing2" class="userInputLarge"/>
                                </td>
                            </tr>
                            <tr>
                                <td><spring:message code="appSpecialistHospital3"/>:<br/>
                                    <form:textarea path="hospital3" id="hospital3" class="userInputLarge"/>
                                </td>
                                <td><spring:message code="appSpecialistPhone3"/>:<br/>
                                    <form:input path="contact3" id="contact" class="userInputLarge"/>
                                </td>
                                <td><spring:message code="appSpecialistTiming3"/>:<br/>
                                    <form:input path="timing3" id="timing3" class="userInputLarge"/>

                                </td>
                            </tr>
                            <tr>
                                <td><spring:message code="remarks"/>:<br/>
                                    <form:textarea path="remarks" class="userInputLarge"/>
                                    <br/><span id="errorsDiv_remarks"></span>
                                </td>
                            </tr>

                        </table>
                    </fieldset>
                    <table class="formTable">
                        <tr>

                            <td><input type="button" name="Cancel" value="Cancel"  onclick="location.href='../appspecialist/listAppSpecialist.htm'"></td>                       
                            <td><input type="submit" name="btnSubmit" class="userInputFormSubmit" value="<spring:message code="button.Update"/>" onclick="return yav.performCheck('form1', rules, 'inline');"/></td>
                        </tr>
                    </table>

                    <spring:hasBindErrors name="appSpecialist">
                        <div class="error">
                            <form:errors path="*"/>
                        </div>
                    </spring:hasBindErrors>
                </fieldset>
            </form:form>
        </div>
    </body>
</html>
